<template>
	<view class="box e-flex flex-col">
		<image  class="e-m-b-38" :src="$staticPath('user/success.png')" ></image>
		<view class="e-m-b-30">
			发送成功
		</view>
		<view class="e-m-b-40">
			您的代付申请已发送给好友
		</view>
		<view class="e-flex">
			<button class="e-m-r-20" @tap="backHome">{{$t('order.返回首页')}}</button>
			<button @tap="see">订单详情</button>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:null,
				orderType:0,
				orderPageType:0,
				orderPageUrl:['/pages/order','/pages/order/reservation','/pages/order/timesCard']
			};
		},
		onLoad(opt) {
			this.orderType = opt?.type||0
			this.orderPageType = opt?.pageType||0
			this.id = opt.id
		},
		methods:{
			backHome () {
				this.$store.commit('setTabbarPageUrl',0)
				this.$switchTab('/pages/tabbar/index')
			},
			see () {
				if(this.orderType == 4){
					uni.redirectTo({
						url:`${this.orderPageUrl[this.orderPageType]}/index`
					})
				}else{
					
					uni.redirectTo({
						url:`${this.orderPageUrl[this.orderPageType]}/details/index?id=${this.id}`
					})
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.flex-col {
		flex-direction: column;
	}
	.box{
		padding-top: 158rpx;
		margin: 0 auto;
		image{
			width: 320rpx;
			height: 224rpx;
		}
		button{
			width: 278rpx;
			height: 90rpx;
			line-height: 90rpx;
			border-radius: 45rpx;
			border: 2rpx solid #303133;
			font-size: 30rpx;
		}
	}

</style>
